package com.baykalcakici.cafepicker.listener;

import com.baykalcakici.cafepicker.dialog.VisitDialog;
import com.google.common.base.Preconditions;

import android.content.Context;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

public class VisitDialogListener implements OnClickListener {
  private TextView textView;
  private Context context;

  public VisitDialogListener(TextView textView, Context context) {
    this.textView = Preconditions.checkNotNull(textView);
    this.context = Preconditions.checkNotNull(context);
  }

  @Override
  public void onClick(View v) {
    VisitDialog.display(textView.getText().toString(), context);
  }
}
